const { defineConfig } = require('@vue/cli-service')
const path = require('path');//配置别名第一步：引用path
const resolve = (dir) => path.join(__dirname, dir);//配置别名第二步：引用resolve方法
module.exports = defineConfig({
  transpileDependencies: true,
  chainWebpack: config => {
    config.resolve.alias // 配置别名第三步：添加别名
      .set('@', resolve('src'))
      .set('assets', resolve('src/assets'))
      .set('common', resolve('src/common'))
      .set('network', resolve('src/network'))
      .set('components', resolve('src/components'))
      .set('views', resolve('src/views'));
  },
  pwa:{
    iconPaths:{
      favicon32: 'favicon.ico',
      favicon16: 'favicon.ico',
      appleTouchIcon: 'favicon.ico',
      maskIcon: 'favicon.ico',
      msTileImage: 'favicon.ico'
    }
  }
})
